using MeetingManagement.Domain.Entities;

namespace MeetingManagement.Domain.Events
{
    public class MeetingScheduledEvent : DomainEvent
    {
        public Guid MeetingId { get; private set; }
        public string Title { get; private set; }
        public DateTime StartTime { get; private set; }
        public DateTime EndTime { get; private set; }
        public Guid OrganizerId { get; private set; }

        public static MeetingScheduledEvent Create(Meeting meeting)
        {
            return new MeetingScheduledEvent
            {
                MeetingId = meeting.Id,
                Title = meeting.Title,
                StartTime = meeting.TimeSlot.Start,
                EndTime = meeting.TimeSlot.End,
                OrganizerId = meeting.OrganizerId
            };
        }
    }
}
